<?php
switch($action){
    case "cut":
        $act_trans = CUT;
    break;
    case "copy":
        $act_trans = COPY;
    break;
    case "paste":
        $act_trans = PASTE;
    break;
    case "delete":
        $act_trans = DEL;
    break;
    case "edit":
        $act_trans = EDIT;
    break;
    case "chmod":
        $act_trans = CHMOD;
    break;
    case "newfile":
        $act_trans = NEWFILE;
    break;
    case "newfolder":
        $act_trans = NEWFOLD;
    break;
    case "zip":
        $act_trans = ZIP;
    break;
    case "unzip":
        $act_trans = UNZIP;
    break;
   default:
        $act_trans = "Error: ".$action;
}
if($_SESSION['dirs']>0 || $_SESSION['files']>0){

$xhtmlclipping .="
<div id=\"clipboard\">
<span class=\"fett\">".CLIPBOARD." / ".ACTION.": ".$act_trans."</span><br />";

if(count($_SESSION['dirs'])>1){
    foreach ($_SESSION['dirs'] as $onedir){
        $xhtmlclipping .= $onedir."<br />\n";
    }
}else {
    $xhtmlclipping .= $_SESSION['dirs'][0];
}
$xhtmlclipping .= "<br />\n";
if(count($_SESSION['files'])>1){
    foreach ($_SESSION['files'] as $onefile){
        $xhtmlclipping .= $onefile."<br />\n";
    }
}else {
    $xhtmlclipping .= $_SESSION['files'][0];
}
$xhtmlclipping .= "<br />\n---\n<br />\n";
$xhtmlclipping .= "Selected folders: ".count($_SESSION['dirs'])."<br />\n Selected files: ".count($_SESSION['files']);

$xhtmlclipping .= "</div>";
}

?>